/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package View;

import javax.swing.JPanel;

/**
 *
 * @author Hieu.Nguyen
 */
public class Report extends javax.swing.JPanel {

    /**
     * Creates new form ThongKeDoanThu
     */
    public Report() {
        initComponents();
    }
      public void loadPanelBaoCao(JPanel panel){
        pnlMainBaoCao.removeAll();
        pnlMainBaoCao.add(panel);
        pnlMainBaoCao.setAutoscrolls(true);
        panel.setVisible(true);
        pnlMainBaoCao.updateUI();
       
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        btnCheckinPayment = new javax.swing.JButton();
        tblServicesPayment = new javax.swing.JButton();
        btnCallsPayment = new javax.swing.JButton();
        btnBuisnessPayment = new javax.swing.JButton();
        pnlMainBaoCao = new javax.swing.JPanel();

        jPanel1.setLayout(new javax.swing.BoxLayout(jPanel1, javax.swing.BoxLayout.LINE_AXIS));

        btnCheckinPayment.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N
        btnCheckinPayment.setText("Checkin Report");
        btnCheckinPayment.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCheckinPaymentActionPerformed(evt);
            }
        });
        jPanel1.add(btnCheckinPayment);

        tblServicesPayment.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N
        tblServicesPayment.setText("Services Report");
        tblServicesPayment.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tblServicesPaymentActionPerformed(evt);
            }
        });
        jPanel1.add(tblServicesPayment);

        btnCallsPayment.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N
        btnCallsPayment.setText("Calls Report");
        btnCallsPayment.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCallsPaymentActionPerformed(evt);
            }
        });
        jPanel1.add(btnCallsPayment);

        btnBuisnessPayment.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N
        btnBuisnessPayment.setText("Business Report");
        btnBuisnessPayment.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuisnessPaymentActionPerformed(evt);
            }
        });
        jPanel1.add(btnBuisnessPayment);

        pnlMainBaoCao.setLayout(new javax.swing.BoxLayout(pnlMainBaoCao, javax.swing.BoxLayout.LINE_AXIS));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addComponent(pnlMainBaoCao, javax.swing.GroupLayout.PREFERRED_SIZE, 1069, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlMainBaoCao, javax.swing.GroupLayout.PREFERRED_SIZE, 522, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void btnBuisnessPaymentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuisnessPaymentActionPerformed
        // TODO add your handling code here:
        loadPanelBaoCao(new ThongKeKinhDoanh());
    }//GEN-LAST:event_btnBuisnessPaymentActionPerformed

    private void btnCallsPaymentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCallsPaymentActionPerformed
        // TODO add your handling code here:
        loadPanelBaoCao(new SRDCallsReport());
    }//GEN-LAST:event_btnCallsPaymentActionPerformed

    private void tblServicesPaymentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tblServicesPaymentActionPerformed
        // TODO add your handling code here:
        loadPanelBaoCao(new ServicesReport());
    }//GEN-LAST:event_tblServicesPaymentActionPerformed

    private void btnCheckinPaymentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCheckinPaymentActionPerformed
        // TODO add your handling code here:
        loadPanelBaoCao(new CheckinReport());
    }//GEN-LAST:event_btnCheckinPaymentActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnBuisnessPayment;
    private javax.swing.JButton btnCallsPayment;
    private javax.swing.JButton btnCheckinPayment;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel pnlMainBaoCao;
    private javax.swing.JButton tblServicesPayment;
    // End of variables declaration//GEN-END:variables
}
